﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'usp_UPDMS_CRD_INFO_Delete_Attach_File')
	BEGIN
		DROP Procedure usp_UPDMS_CRD_INFO_Delete_Attach_File
	END
GO

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
/******************************************************************************
**	Name : usp_UPDMS_CRD_INFO_Delete_Attach_File
**	Desc : 업로드된 Attach_File을 삭제한다.
**	Test Exec Query : Exec usp_UPDMS_CRD_INFO_Delete_Attach_File
**	Called by : Crd_Dac_UPDMS_CRD_INFO.cs
**	Program ID : Crd1010m
**	Auth : 송시명
**	Date : 2010-06-04
*******************************************************************************
**	Change History
*******************************************************************************
**	Date:		Author:		Description:
**	--------	--------	---------------------------------------
**	
*******************************************************************************/
CREATE PROC [dbo].[usp_UPDMS_CRD_INFO_Delete_Attach_File]
@Seq int,
@li_file_idx int
AS
SET NOCOUNT OFF

IF @li_file_idx = 1
BEGIN
  UPDATE UPDMS_CRD_INFO
     SET Attach_File1 = NULL,
         Attach_File1_Size = NULL
   WHERE Seq = @Seq
END

GO